package com.sixth.service.Impl;

import com.sixth.dao.DepartmentDao;
import com.sixth.entity.Department;
import com.sixth.service.DeptService;
import com.sixth.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: project01
 * @description:
 * @author: 高振杨
 * @create: 2021-12-17 19:39
 **/
@Service(value = "deptservice")
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DepartmentDao departmentDao;
    public CommonResult finAll() {
        List<Department> departments=departmentDao.findAll();
        return new CommonResult(2000,"查询成功",departments);
    }
}
